<?php
class ProfileController extends Zend_Controller_Action 
{
protected $ai=null;

public function init()
{
	parent::init();	
	
	$uid=$this->getRequest()->getActionName();
	if("index" == $uid)
	{
		$uid=null;
	}
	else
	{
		$this->ai=new Account($uid);	
	}
	$this->_forward("show");
}

public function showAction()
{	
	if($this->ai->GetInfo()==null)
	{
		$error=new stdclass;
		$error->error_code=-100;
		$error->error_msg="Doesn't exist";
		echo json_encode($error);
	}
	else
	{
		echo json_encode($this->ai->GetInfo());
	}
}
	
}
?>
